package cn.exrick.xboot.modules.transport.service;

import cn.exrick.xboot.modules.transport.param.*;
import cn.exrick.xboot.modules.transport.vo.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.exrick.xboot.modules.transport.entity.Orders;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单表接口
 * @author gj
 */
public interface OrdersService extends IService<Orders> {

    /**
     * 创建订单
     * @param param
     * @return
     */
    OrdersVo userCreatesOrder(CreateOrdersParam param);

    OrdersVo getOrderById(Long id);

    IPage<OrdersOutlineVo> getByCondition(Page page, QueryOrdersParam param);

    OrdersVo userCancelOrder(CancelOrdersParam cancelOrdersParam);

    OrdersVo warehousesReceiveOrder(ReceiveOrdersParam receiveOrdersParam);

    OrdersVo setOrderReceiverId(OrderReceiverParam param);

    /**
     * 订单转运 流转操作 --车辆扫描确认
     * @param wayOrderParam
     * @return
     */
    OrderCarNodeResultVo warehousesWayOrder(WayOrderParam wayOrderParam);

    OrdersVo userConfirmOrder(Long orderId);

    /**
     * 订单支付
     * @param orderId
     * @return
     */
    OrdersVo paymentOrder(Long orderId);

    /**
     *
     * @param param
     * @return
     */
    List<OrdersReportVo> report(OrderReportParam param);

    List<PayableReportVo> getPayableReport(String reportDate);

    List<ReceivableReportVo> getReceivableReport(String reportDate);

    List<IncomeReportVo> getIncomeReport(String reportDate);
}